package weifei.wx.community.entity;


import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.Getter;
import org.springframework.stereotype.Repository;



@Data
@Table("adminer")
@Repository
public class Adminer
{

    @Getter
    public enum Column
    {
        ID("id"),
        Nickname("nickname"),
        Username("username"),
        Password("password");

        final String name;

        Column(String name) { this.name = name; }
    }


    @Id(keyType = KeyType.Auto)
    private Integer id;
    private String nickname;
    @NotBlank @NotNull
    private String username;
    @NotBlank @NotNull
    private String password;


    public Adminer() {}
    /**
     * selectByID
     * deleteByID
     * 使用
     * */
    public Adminer(int adminerId) { this.id = adminerId; }
}


